<template>
  <Person v-if="isShow" />
</template>

<script lang="ts" setup name="App">
//在Vue3中，子组件比父组件先挂载完毕

import Person from "./components/Person.vue"; //移入组件
import { onMounted, ref } from "vue";

let isShow = ref(true);

onMounted(() => {
  console.log("挂载完毕App");
});
</script>

<style></style>
